package com.itany.corejava.code17_设计模式.工厂模式;


import com.itany.corejava.entity.User;

import java.util.Date;

/**
 * @author Miss Chen
 * @version 1.0
 * @date 2024年08月13日14:02
 */
public class Test {
    public static void main(String[] args) {
        User user= (User) ObjectFactory.getObject("user");
        User user2= (User) ObjectFactory.getObject("user");
        System.out.println(user);
        System.out.println(user2);

        Date date= (Date) ObjectFactory.getObject("date");
        System.out.println(date);
    }
}
